package com.example.g5project.repository.dao;

import com.example.g5project.entity.relation.HelpMessage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;

/**
 * @author Hu Zirui
 * @version 1.0.0
 * @ClassName ConsultantDao.java
 * @Description TODO
 * @createTime 2022年03月25日 15:08:00
 */
@Repository
@Transactional
@SuppressWarnings("all")
public interface ConsultantHelpMessageDao extends JpaRepository<HelpMessage, Integer>, JpaSpecificationExecutor {
    @Query(value = "select * from help_messages where help_message_id = ?1", nativeQuery = true)
    ArrayList<HelpMessage> getMessageContent(Integer id);
}

